/**
 * 作者：陈文斌 on 2019/1/26.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';

class PainPointRecordRowSection extends StatefulWidget {
  final GestureTapCallback onTap;

  PainPointRecordRowSection({Key key, this.onTap}) : super(key: key);

  @override
  State<StatefulWidget> createState() {
    return _PainPointRecordRowSectionState();
  }
}

class _PainPointRecordRowSectionState extends State<PainPointRecordRowSection> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: widget.onTap,
      child: Dismissible(
        key: widget.key,
        onDismissed: (direction) {},
        background: new Container(
          color: Colors.red,
        ),
        child: Container(
          color: Colors.white,
          padding: EdgeInsets.fromLTRB(13, 13, 13, 12),
          child: Column(
            children: <Widget>[
              Text(
                '前往客户公司洽谈项目细节，并签订合同前往客户公司洽谈项目细节，并签订合同',
                style: TextStyle(
                  color: AppColors.TextColor,
                  fontSize: AppFontSizes.Font15,
                  fontFamily: AppFontFamilies.PingFangSC,
                  fontWeight: FontWeight.w500,
                ),
              ),
              PaddingSet.PaddingTop(7),
              Container(
                height: 17,
                child: Row(
                  children: <Widget>[
                    Container(
                      width: 15,
                      height: 15,
                      color: AppColors.MainColor,
                    ),
                    PaddingSet.PaddingLeft(7),
                    Text(
                      '信兴拉链',
                      style: TextStyle(
                        color: AppColors.DetailTextColor,
                        fontSize: AppFontSizes.Font12,
                        fontFamily: AppFontFamilies.PingFangSC,
                        fontWeight: FontWeight.w500,
                      ),
                      overflow: TextOverflow.ellipsis,
                      maxLines: 1,
                    ),
                    PaddingSet.PaddingLeft(20),
                    ConstrainedBox(
                      constraints: BoxConstraints(
                        minWidth: 120,
                      ),
                      child: Text(
                        '2018/03/19 16:00',
                        style: TextStyle(
                          color: AppColors.MainColor,
                          fontSize: AppFontSizes.Font12,
                          fontFamily: AppFontFamilies.PingFangSC,
                          fontWeight: FontWeight.w500,
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
